Repository navigation
Logs: debug when developing, info in release, warnings in the file - #1900
Open
vmillet-dev wants to merge 1 commit into
Open
vmillet-dev wants to merge 1 commit into
vmillet-dev wants to merge 1 commit into
Conversation
A debug build's terminal shows our crates from debug, a release's from info; the file keeps warnings and errors alone. Every other crate stays at warn, the two echoes off. The e2e flavour files from debug, kept beside a failed journey, and keeps its terminal to errors, so a run's console stays as quiet as it was. DEVNOTES_LOG replaces the levels for one run; an unreadable one is ignored with a warning. One line format for both outputs: local time to the millisecond, level, thread, target. Decision D35 (D34 was taken); the wiki gets its logs page. Closes #1842 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3
This was referenced Dec 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1842
Levels, by build (
crates/app/src/logging.rs)debugwarnanderrorinfowarnanderrore2eflavourerroralone, as todaydebugOur crates are the workspace's (the binary's own read from
CARGO_CRATE_NAME, which isdevnotes, notapp); every other crate stays atwarn, and the two echoes (cargo_packager_updater,eframe::native::run) stay off. The file writer is aFileLogWriterwe build with its ownmax_level, handed toflexi_loggeras its writer, the terminal a duplicate: no new crate, and #1845 will wrap that writer.The e2e flavour's console stays quiet. Its terminal is a file the driver keeps beside a failed journey, and journey 1 checks it says nothing at first launch: it keeps to errors, so nothing new reaches a run's console. Its log holds every level from
debug, and is kept beside a failed journey only, as today. Journey 1's first step now also checks that the log holdsdebuglines (app.disk().expect_debug_in_log).DEVNOTES_LOG, inflexi_logger's syntax, replaces the levels for one run in any build; unreadable (or not UTF-8), it is ignored and one warning says so, without echoing the value. The firstdebugline of a run says the levels in force.One line format for both outputs:
2026-12-04 18:45:04.185 DEBUG [main] devnotes::logging: …— local time to the millisecond, level, thread, target, message.Docs — decision D35 Logs (D34 was already the title bar); a new wiki page
docs/architecture/logs.md(« The three outputs », « What a line may say », « Changing the levels for one run »);engine.md,testing.mdandCONTRIBUTING.md(logs while developing,DEVNOTES_LOG, what a failed journey leaves).Owner's decision applied — the variable keeps the
DEVNOTES_prefix (asked in this session, for #1896 too).Checks run (Linux)
cargo test -p app --bin devnotes logging: 12 pass. The terminal test is now five tests run apart: a debug build (debug shown, file warn+), a release (info shown, debug not, file warn+), the e2e flavour (terminal errors alone, file from debug), the line format,DEVNOTES_LOG=engine=trace(a trace line ofenginealone), and an unreadable value (default levels, one warning). A dependency'sinforeaches neither output in each.01_first_dayunder Xvfb: green, console showing the steps alone.cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo fmt --all --check,node --test "scripts/*.test.mjs".Generated by Claude Code